<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改NPC配置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-npc-edit" th:object="${pNpc}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">npc名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">坐标X：</label>
                <div class="col-sm-8">
                    <input name="x" th:field="*{x}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">坐标Y：</label>
                <div class="col-sm-8">
                    <input name="y" th:field="*{y}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">朝向：</label>
                <div class="col-sm-8">
                    <input name="yfangxiang" th:field="*{fangxiang}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地图id：</label>
                <div class="col-sm-8">
                    <input name="mapid" th:field="*{mapid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">对话：</label>
                <div class="col-sm-8">
                    <textarea name="content" class="form-control">[[*{content}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">外观：</label>
                <div class="col-sm-8">
                    <input name="icon" th:field="*{icon}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物品：</label>
                <div class="col-sm-8">
                    <textarea name="list" class="form-control">[[*{list}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">对话2：</label>
                <div class="col-sm-8">
                    <textarea name="content1" class="form-control">[[*{content1}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">npc类型：</label>
                <div class="col-sm-8">
                    <input name="type" th:field="*{type}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/npc";
        $("#form-npc-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-npc-edit').serialize());
            }
        }
    </script>
</body>
</html>